//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright 2007 CORE Solutions Limited
// All rights reserved.
// PROPRIETARY AND CONFIDENTIAL INFORMATION.
// Use is subject to license terms.
//
// FUNCTION ID      :   ACCESS_TEAM
// AUTHOR           :   Jerry Chen 
// DATE CREATE      :   2007/10/26
// DESCRIPTION      :   a BIZ LOGIC file for the function, ACCESS_TEAM
//                  :   
//                  :   
//                  :   
//
// MODIFICATION HISTORY:
// DATE         AUTHOR          VERSION NO.         COMMENT
// -----------  --------------  ------------------  -------------------
// 2007/10/26   Jerry Chen      1.0                 source is generated.
//
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

package com.erp.app.setup.accessTeamMaster.bizLogic;

import java.sql.Connection;

import com.erp.app.setup.accessTeamMaster.dao.AccessTeamCommonDao;
import com.erp.app.setup.accessTeamMaster.vo.AccessTeamHdrVo;
import com.erp.framework.model.bizLogic.SimpleSearchMaintStyleBizLogic;
import com.erp.framework.model.vo.SimpleBaseVo;
import com.erp.framework.util.logger.Logger;

/**
* <p>A <strong>BizLogic</strong> provides the logical flow and control
* of the business model at different transaction time.
*
* @author          Jerry Chen 
* @version 1.0     2007/10/26
* @since           FrameWork 1.0
*
*/
public class AccessTeamBizLogic extends SimpleSearchMaintStyleBizLogic {

	private AccessTeamCommonUtil util = new AccessTeamCommonUtil();
	private AccessTeamCommonDao dao = new AccessTeamCommonDao();

	/**
	* Generates a unique document number.
	*
	* @param      model   the incoming business model (VO)
	* @param      conn    the database connection
	*
	* @author     Jerry Chen 
	* @since      Framework 1.0
	*/
	public void genDocNo(SimpleBaseVo model, Connection conn) throws Exception {

		//TODO:
		//Uncomment the following code and modify accordingly

		AccessTeamHdrVo vo = (AccessTeamHdrVo) model;
		vo.setAccessTeamCode(util.generateDocumentNo(model, conn));
	}

	/**
	* Provides logics to insert business object before creating the object.
	* Note that this function has NO user transaction control.
	*
	* @param      model   the incoming business model (VO)
	*
	* @author     Jerry Chen 
	* @since      Framework 1.0
	*/
	public void bizLogicsBeforeCreate(SimpleBaseVo model) throws Exception {
		Logger.debug(this, "in bizLogicsBeforeCreate()");
	}

	/**
	* Provides logics to insert business object before creating the object.
	* Note that this function has user transaction control.
	*
	* @param      model   the incoming business model (VO)
	* @param      conn    the database connection
	*
	* @author     Jerry Chen 
	* @since      Framework 1.0
	*/
	public void bizLogicsBeforeCreateModel(SimpleBaseVo model, Connection conn) throws Exception {

		Logger.debug(this, "in bizLogicsBeforeCreateModel()");
		//AccessTeamCommonUtil.setPkForNonStandardChildren(model);
	}

	/**
	* Provides logics to insert business object after creating the object.
	* Note that this function has user transaction control.
	*
	* @param      model   the incoming business model (VO)
	* @param      conn    the database connection
	*
	* @author     Jerry Chen 
	* @since      Framework 1.0
	*/
	public void bizLogicsAfterCreateModel(SimpleBaseVo model, Connection conn) throws Exception {

		Logger.debug(this, "in bizLogicsAfterCreateModel()");
	}
	
	/**
	* Provides logics to insert business object after creating the object.
	* Note that this function has NO user transaction control.
	*
	* @param      model   the incoming business model (VO)
	*
	* @author     Jerry Chen 
	* @since      Framework 1.0
	*/
	public void bizLogicsAfterCreate(SimpleBaseVo model) throws Exception {

		Logger.debug(this, "in bizLogicsAfterCreate()");
	}

	/**
	* Provides logics to update business object before updating the object.
	* Note that this function has NO user transaction control.
	*
	* @param      model   the incoming business model (VO)
	*
	* @author     Jerry Chen 
	* @since      Framework 1.0
	*/
	public void bizLogicsBeforeUpdate(SimpleBaseVo model) throws Exception {

		Logger.debug(this, "in bizLogicsBeforeUpdate()");
	}
	
	/**
	* Provides logics to update business object before updating the object.
	* Note that this function has user transaction control.
	*
	* @param      model   the incoming business model (VO)
	* @param      conn    the database connection
	*
	* @author     Jerry Chen 
	* @since      Framework 1.0
	*/
	public void bizLogicsBeforeUpdateModel(SimpleBaseVo model, Connection conn) throws Exception {

		Logger.debug(this, "in bizLogicsBeforeUpdateModel()");
	}

	/**
	* Provides logics to update business object after updating the object.
	* Note that this function has user transaction control.
	*
	* @param      model   the incoming business model (VO)
	* @param      conn    the database connection
	*
	* @author     Jerry Chen 
	* @since      Framework 1.0
	*/
	public void bizLogicsAfterUpdateModel(SimpleBaseVo model, Connection conn) throws Exception {

		Logger.debug(this, "in bizLogicsAfterUpdateModel()");
	}

	/**
	* Provides logics to update business object after updating the object.
	* Note that this function has NO user transaction control.
	*
	* @param      model   the incoming business model (VO)
	*
	* @author     Jerry Chen 
	* @since      Framework 1.0
	*/
	public void bizLogicsAfterUpdate(SimpleBaseVo model) throws Exception {

		Logger.debug(this, "in bizLogicsAfterUpdate()");
	}
	
	/**
	* Provides logics to remove business object before removing the object.
	* Note that this function has NO user transaction control.
	*
	* @param      model   the incoming business model (VO)
	*
	* @author     Jerry Chen 
	* @since      Framework 1.0
	*/
	public void bizLogicsBeforeRemove(SimpleBaseVo model) throws Exception {

		Logger.debug(this, "in bizLogicsBeforeRemove()");
	}
	
	/**
	* Provides logics to remove business object before removing the object.
	* Note that this function has user transaction control.
	*
	* @param      model   the incoming business model (VO)
	* @param      conn    the database connection
	*
	* @author     Jerry Chen 
	* @since      Framework 1.0
	*/
	public void bizLogicsBeforeRemoveModel(SimpleBaseVo model, Connection conn) throws Exception {

		Logger.debug(this, "in bizLogicsBeforeRemoveModel()");
	}

	/**
	* Provides logics to remove business object after removing the object.
	* Note that this function has user transaction control.
	*
	* @param      model   the incoming business model (VO)
	* @param      conn    the database connection
	*
	* @author     Jerry Chen 
	* @since      Framework 1.0
	*/
	public void bizLogicsAfterRemoveModel(SimpleBaseVo model, Connection conn) throws Exception {

		Logger.debug(this, "in bizLogicsAfterRemoveModel()");
	}
	/**
	* Provides logics to remove business object after removing the object.
	* Note that this function has NO user transaction control.
	*
	* @param      model   the incoming business model (VO)
	*
	* @author     Jerry Chen 
	* @since      Framework 1.0
	*/
	public void bizLogicsAfterRemove(SimpleBaseVo model) throws Exception {

		Logger.debug(this, "in bizLogicsAfterRemove()");
	}
	
}
